<template>
  <div class="input">
    <input
      type="checkbox"
      :checked="fullState"
      @change="fullChange"
      id="qx"
    /><label for="qx">全选</label>
  </div>
</template>

<script>
export default {
  props: {
    // 全选的状态 父传子
    fullState: "",
  },
  methods: {
    // 监听全选状态 子传父
    fullChange(e) {
      this.$emit("fullChange", e.target.checked);
    },
  },
};
</script>

<style lang="less" scoped>
.input {
  user-select: none;
  position: absolute;
  font-weight: 600;
  font-size: 14px;
  top: 40px;
  left: 27px;
  color: #b71c1c;
  input {
    width: 20px;
    height: 20px;
  }
}
</style>